package com.miplus.ccrm.core.utils;

import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.miplus.ccrm.core.pojo.CfgRuleVars;

public enum EnumRuleStepAction {
    /**
     /**
     *  1: 分案
     *  2：派工
     *  3：任务
     *  4：回收
     *  5：部门内回收
     *  6：添加标签
     *  7：删除标签
     */
    DISTRIBUTE(1, "分案"),
    ASSIGN(2, "派工"),
    CAMPAIGN(3, "活动"),
    CALLBACK(4, "退回案件池"),
    GRPCALLBACK(5,"部门回收"),
    ADDCUSTTAG(6,"添加客户分组"),
    DELETECUSTTAG(7,"删除客户分组"),
    ADDCOLLECTTAG(8,"添加催案分组"),
    DELETECOLLECTTAG(9,"删除催案分组"),
    AIQM(10,"智能质检"),
    CCARD(11,"C卡");



    private final Integer code;
    private final String desc;

    // 构造方法 ,赋值给成员变量
    EnumRuleStepAction(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode()
    {
        return code;
    }
    public String getDesc()
    {
        return desc;
    }
    public static String getDescByCode(Integer code) {
        for (EnumRuleStepAction enums : EnumRuleStepAction.values()) {
            if (enums.getCode().equals(code)) {
                return enums.getDesc();
            }
        }
        return null;
    }
    public static EnumRuleStepAction getEnumByCode(Integer code) {
        for (EnumRuleStepAction enums : EnumRuleStepAction.values()) {
            if (enums.getCode().equals(code)) {
                return enums;
            }
        }
        return null;
    }

}
